<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Amigo Burbuja: Globito Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Amigo Burbuja
   &#160;<span id="projectnumber">25 de mayo del 2013</span>
   </div>
   <div id="projectbrief">Ayuda a nuestro amigo Patricio a salir del fondo del cañon</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_globito.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_globito-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Globito Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for Globito:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_globito.png" usemap="#Globito_map" alt=""/>
  <map id="Globito_map" name="Globito_map">
<area href="class_objeto_sube.html" alt="ObjetoSube" shape="rect" coords="0,56,78,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3123d3f7082be25ebc81b508b9013cf9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_globito.html#a3123d3f7082be25ebc81b508b9013cf9">Globito</a> (<a class="el" href="class_patricio.html">Patricio</a> patri, int resistencia)</td></tr>
<tr class="separator:a3123d3f7082be25ebc81b508b9013cf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96c6f69159240041c9ed43234b339990"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_globito.html#a96c6f69159240041c9ed43234b339990">contador</a> (int unContador)</td></tr>
<tr class="separator:a96c6f69159240041c9ed43234b339990"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28ba368a5af40d3a82f75ed56e8c859f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_globito.html#a28ba368a5af40d3a82f75ed56e8c859f">act</a> ()</td></tr>
<tr class="separator:a28ba368a5af40d3a82f75ed56e8c859f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d7e41001ec04be905233ed89e08c5dd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_globito.html#a8d7e41001ec04be905233ed89e08c5dd">mueve</a> (int sub)</td></tr>
<tr class="separator:a8d7e41001ec04be905233ed89e08c5dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6dc4dee7fe0230442539a98e5c9dc640"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_globito.html#a6dc4dee7fe0230442539a98e5c9dc640">seEncuentraGlobo</a> ()</td></tr>
<tr class="separator:a6dc4dee7fe0230442539a98e5c9dc640"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed55cd95e3cf68c1d77b85a158243a5f"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_globito.html#aed55cd95e3cf68c1d77b85a158243a5f">encuentraLindoNopal</a> ()</td></tr>
<tr class="separator:aed55cd95e3cf68c1d77b85a158243a5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9f1420533cae06335311af15b53ce5b"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_globito.html#ae9f1420533cae06335311af15b53ce5b">encuentraMaderita</a> ()</td></tr>
<tr class="separator:ae9f1420533cae06335311af15b53ce5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5477a2c09fbbeb77da5c7178d6cfc051"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_globito.html#a5477a2c09fbbeb77da5c7178d6cfc051">meEncontreUnGloboLoPoncho</a> ()</td></tr>
<tr class="separator:a5477a2c09fbbeb77da5c7178d6cfc051"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a548c499f8850c11aa849e5fa147b952a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_globito.html#a548c499f8850c11aa849e5fa147b952a">reiniciaPosicion</a> ()</td></tr>
<tr class="separator:a548c499f8850c11aa849e5fa147b952a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba2590583e7128a5b2daa7feefb154be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_globito.html#aba2590583e7128a5b2daa7feefb154be">cambiaImagenGlobo</a> ()</td></tr>
<tr class="separator:aba2590583e7128a5b2daa7feefb154be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_objeto_sube"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_objeto_sube')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_objeto_sube.html">ObjetoSube</a></td></tr>
<tr class="memitem:a4b5d4e87c960bf12629b81cef955a8fa inherit pub_methods_class_objeto_sube"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_objeto_sube.html#a4b5d4e87c960bf12629b81cef955a8fa">subir</a> ()</td></tr>
<tr class="separator:a4b5d4e87c960bf12629b81cef955a8fa inherit pub_methods_class_objeto_sube"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21b0c98372c740fe0237c6634cd6d581 inherit pub_methods_class_objeto_sube"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_objeto_sube.html#a21b0c98372c740fe0237c6634cd6d581">subir</a> (int unDato)</td></tr>
<tr class="separator:a21b0c98372c740fe0237c6634cd6d581 inherit pub_methods_class_objeto_sube"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="class_globito.html">Globito</a>, Clase que representa a los Globos de los cuales cuelga <a class="el" href="class_patricio.html">Patricio</a>.</p>
<dl class="section author"><dt>Author</dt><dd>Montes Alonso Irli Natali </dd></dl>
<dl class="section version"><dt>Version</dt><dd>Programacion Orientada a Objetos </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a3123d3f7082be25ebc81b508b9013cf9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Globito.Globito </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_patricio.html">Patricio</a>&#160;</td>
          <td class="paramname"><em>patri</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>resistencia</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>constructor de <a class="el" href="class_globito.html">Globito</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">patri</td><td>hace referencia a <a class="el" href="class_patricio.html">Patricio</a> </td></tr>
    <tr><td class="paramname">resistencia</td><td>es la resistencia que tendra el <a class="el" href="class_globito.html">Globito</a> </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    {</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;        encuentraObstaculo=<span class="keyword">false</span>;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;        <a class="code" href="class_objeto_sube.html#a4b5d4e87c960bf12629b81cef955a8fa">subir</a>(1);</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;        patricio=patri;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        contador=resistencia;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <a class="code" href="class_globito.html#aba2590583e7128a5b2daa7feefb154be">cambiaImagenGlobo</a>();</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a28ba368a5af40d3a82f75ed56e8c859f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Globito.act </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>metodo donde se hacen comparaciones para poder logar que los globos se detengan, se muevan hacia arriba, checa si llego hasta arriba para pasar de nivel siempre y cuando no encuentre algun obstaculo que se lo impida. </p>
<div class="fragment"><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    {</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keywordflow">if</span>(this.<a class="code" href="class_globito.html#a6dc4dee7fe0230442539a98e5c9dc640">seEncuentraGlobo</a>())</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        {</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;            <a class="code" href="class_objeto_sube.html#a4b5d4e87c960bf12629b81cef955a8fa">subir</a>(0);    </div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;            patricio.<a class="code" href="class_patricio.html#a428b9470ccc8f8e6d98d334afa86afa1">detenPatricio</a>();</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;            encuentraObstaculo=<span class="keyword">true</span>;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        }</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        {</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;            <a class="code" href="class_objeto_sube.html#a4b5d4e87c960bf12629b81cef955a8fa">subir</a>(1);</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;            <span class="keywordflow">if</span>(getY()&gt;10)</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;                patricio.<a class="code" href="class_patricio.html#ab970af130120f6224789db1a4801ce13">sigueSubiendoPat</a>();</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        } </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordflow">if</span>(! <a class="code" href="class_globito.html#aed55cd95e3cf68c1d77b85a158243a5f">encuentraLindoNopal</a>() &amp;&amp; !<a class="code" href="class_globito.html#a5477a2c09fbbeb77da5c7178d6cfc051">meEncontreUnGloboLoPoncho</a>() &amp;&amp; !<a class="code" href="class_globito.html#ae9f1420533cae06335311af15b53ce5b">encuentraMaderita</a>())</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        {</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            <span class="keywordflow">if</span>(<a class="code" href="class_globito.html#a8d7e41001ec04be905233ed89e08c5dd">mueve</a>(<a class="code" href="class_objeto_sube.html#a4b5d4e87c960bf12629b81cef955a8fa">subir</a>())==10)<span class="comment">//compara si la posicion del globo llego hasta arriba</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;            {</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;                <a class="code" href="class_objeto_sube.html#a4b5d4e87c960bf12629b81cef955a8fa">subir</a>(0);    </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                patricio.<a class="code" href="class_patricio.html#a428b9470ccc8f8e6d98d334afa86afa1">detenPatricio</a>();</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;                ((<a class="code" href="class_fondo.html">Fondo</a>)this.getWorld()).cambiaJuego();</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                encuentraObstaculo=<span class="keyword">true</span>;<span class="comment">//si se cumple detiene el juego</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;            }</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        }</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        <a class="code" href="class_globito.html#aba2590583e7128a5b2daa7feefb154be">cambiaImagenGlobo</a>();</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aba2590583e7128a5b2daa7feefb154be"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Globito.cambiaImagenGlobo </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Metodo que permite cambiar de imagen para el globo dependiendo de la dureza de cada globo y de cuantas veces ha sido tocado </p>
<div class="fragment"><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    {</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;        <span class="keywordflow">if</span>(contador==1)</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;            this.setImage(<span class="stringliteral">&quot;globo.png&quot;</span>);</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        <span class="keywordflow">if</span>(contador&gt;=2&amp;&amp;contador&lt;4)</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;            this.setImage(<span class="stringliteral">&quot;globod.png&quot;</span>);</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;        <span class="keywordflow">if</span>(contador&gt;=4)</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;            this.setImage(<span class="stringliteral">&quot;globom.png&quot;</span>);</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a96c6f69159240041c9ed43234b339990"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Globito.contador </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>unContador</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Metodo que recibe como parametro unContador y se le asigna a la variable de instancia contador </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">unContador</td><td>sera asignado a la variable contador </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    {</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        contador=unContador;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aed55cd95e3cf68c1d77b85a158243a5f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean Globito.encuentraLindoNopal </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>metodo que detecta si el globo encontro un nopal, si lo encontro se elimina un globo. </p>
<dl class="section return"><dt>Returns</dt><dd>true si un <a class="el" href="class_cactus.html">Cactus</a> toca al globo </dd>
<dd>
false si no es tocado por un <a class="el" href="class_cactus.html">Cactus</a> </dd></dl>
<div class="fragment"><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    {</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        Actor nopalito=super.getOneIntersectingObject(<a class="code" href="class_cactus.html">Cactus</a>.class);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        World mundo;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        mundo=super.getWorld();</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keywordflow">if</span>(nopalito != null)</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        {</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;            contador--;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            <span class="keywordflow">if</span>(contador==0)</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;            {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                this.patricio.<a class="code" href="class_patricio.html#a9e112dd1e63dd0316a97e1b9ec56aa6b">eliminaleGlobo</a>(<span class="keyword">this</span>);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;                mundo.removeObject(<span class="keyword">this</span>);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;                Greenfoot.playSound(<span class="stringliteral">&quot;globo.wav&quot;</span>);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            }</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;            mundo.removeObject(nopalito);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        }</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;  </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae9f1420533cae06335311af15b53ce5b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean Globito.encuentraMaderita </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>metodo que regresa true si encontro una madera y se reinicia la posicion de los globos si regresa false quiere decir que no ah encontrado nada </p>
<dl class="section return"><dt>Returns</dt><dd>true si una <a class="el" href="class_maderota.html">Maderota</a> toca al globo </dd>
<dd>
false si no es tocado por una <a class="el" href="class_maderota.html">Maderota</a> </dd></dl>
<div class="fragment"><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    {</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        Actor madera=super.getOneIntersectingObject(<a class="code" href="class_maderota.html">Maderota</a>.class);</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        World mundo;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        mundo=super.getWorld();</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        <span class="keywordflow">if</span>(madera != null)</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        {</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;            <a class="code" href="class_globito.html#a548c499f8850c11aa849e5fa147b952a">reiniciaPosicion</a>();</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        }</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>;  </div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a5477a2c09fbbeb77da5c7178d6cfc051"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean Globito.meEncontreUnGloboLoPoncho </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>metodo que checa si los globos encuentran una espina, si es asi se revienta y se decrementa el contador para ver las vidas de cada globo </p>
<dl class="section return"><dt>Returns</dt><dd>true si una <a class="el" href="class_espina.html">Espina</a> toca al globo </dd>
<dd>
false si no es tocado por una <a class="el" href="class_espina.html">Espina</a> </dd></dl>
<div class="fragment"><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    {</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        Actor espinita=super.getOneIntersectingObject(<a class="code" href="class_espina.html">Espina</a>.class);</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        World mundo;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        mundo=super.getWorld();</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        <span class="keywordflow">if</span>(espinita != null)</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        {</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;            contador--;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;            <span class="keywordflow">if</span>(contador==0)</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;            {</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;                this.patricio.<a class="code" href="class_patricio.html#a9e112dd1e63dd0316a97e1b9ec56aa6b">eliminaleGlobo</a>(<span class="keyword">this</span>);</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;                mundo.removeObject(<span class="keyword">this</span>);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;                Greenfoot.playSound(<span class="stringliteral">&quot;globo.wav&quot;</span>);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;            }</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            mundo.removeObject(espinita);</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        }</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">false</span>; </div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8d7e41001ec04be905233ed89e08c5dd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int Globito.mueve </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>sub</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Metodo que mueve el globo hacia arriba </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sub</td><td>numero de coordenadas en Y que subira el globo </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="class_objeto_sube.html#a7de738f515da8d3a587cd5e499aa35d0">ObjetoSube</a>.</p>
<div class="fragment"><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    {</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="keywordtype">int</span> sube=sub;<span class="comment">//cantidad de movimientos que dara hacia arriba</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="keywordflow">if</span>(!encuentraObstaculo)</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        {</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;            <span class="keywordflow">if</span>(super.getY()&gt;0)<span class="comment">//mientras la posicion del globo en Y sea mayor que 0</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            {</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;                sube=(getY()-sube);<span class="comment">// sube se iguala al valor de la posicion en Y - los pasos que se quieren dar</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                this.setLocation(getX(),sube);<span class="comment">//se pone el globo en la posicion de X y Y deseada</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;            }</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        }</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <span class="keywordflow">return</span> sube;<span class="comment">// se regresa sube que es donde se encuentra la posicion que se elevo el globo</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a548c499f8850c11aa849e5fa147b952a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Globito.reiniciaPosicion </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>metodo para reinicir la posicion tanto de los globos como de patricio </p>
<div class="fragment"><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    {</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        World mundo;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        mundo=super.getWorld();</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        java.util.List listaPatricio=mundo.getObjects(<a class="code" href="class_patricio.html">Patricio</a>.class);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        <span class="keywordflow">if</span>(!listaPatricio.isEmpty())</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        {</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;            Object obj= listaPatricio.get(0);</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;            Actor patricio=(Actor)obj;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;            patricio.setLocation(334, 342);</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        }</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        java.util.List listaGlobo=mundo.getObjects(<a class="code" href="class_globito.html">Globito</a>.class);</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <span class="keywordflow">if</span>(!listaGlobo.isEmpty())</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        {</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;            Object obj= listaGlobo.get(0);</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;            Actor globo1=(Actor)obj;</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;            globo1.setLocation(366, 289);</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;            ((<a class="code" href="class_globito.html#a3123d3f7082be25ebc81b508b9013cf9">Globito</a>)globo1).contador--;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;            <span class="keywordflow">if</span>(((<a class="code" href="class_globito.html">Globito</a>)globo1).contador==0)</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            {</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;                this.patricio.<a class="code" href="class_patricio.html#a9e112dd1e63dd0316a97e1b9ec56aa6b">eliminaleGlobo</a>((<a class="code" href="class_globito.html">Globito</a>)globo1);</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;                mundo.removeObject(globo1);</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;                Greenfoot.playSound(<span class="stringliteral">&quot;globo.wav&quot;</span>);</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            }</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;            <span class="keywordflow">if</span>(listaGlobo.size()==2)</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;            {</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;                Object obj1= listaGlobo.get(1);</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;                Actor globo2=(Actor)obj1;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;                globo2.setLocation(314, 289);</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;                ((<a class="code" href="class_globito.html#a3123d3f7082be25ebc81b508b9013cf9">Globito</a>)globo2).contador--;</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;                <span class="keywordflow">if</span>(((<a class="code" href="class_globito.html">Globito</a>)globo2).contador==0)</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;                {</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;                    this.patricio.eliminaleGlobo((<a class="code" href="class_globito.html">Globito</a>)globo2);</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;                    mundo.removeObject(globo2);</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;                    Greenfoot.playSound(<span class="stringliteral">&quot;globo.wav&quot;</span>);</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;                }</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;            }</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;        }</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a6dc4dee7fe0230442539a98e5c9dc640"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean Globito.seEncuentraGlobo </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Metodo que detecta si el globo encontro a un portador </p>
<dl class="section return"><dt>Returns</dt><dd>true si alguna Caja toca al globo </dd>
<dd>
false si no es tocado por alguna Caja </dd></dl>
<div class="fragment"><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    {</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        Actor caja=super.getOneIntersectingObject(<a class="code" href="class_cajas.html">Cajas</a>.class);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keywordflow">if</span>(caja != null)</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;            encuentraObstaculo=<span class="keyword">true</span>;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;            encuentraObstaculo=<span class="keyword">false</span>;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keywordflow">return</span> encuentraObstaculo;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>amigoBurbuja/<a class="el" href="_globito_8java.html">Globito.java</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_globito.html">Globito</a></li>
    <li class="footer">Generated on Sat May 25 2013 13:04:16 for Amigo Burbuja by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li>
  </ul>
</div>
</body>
</html>
